using System;
using System.Collections.Generic;
using System.Text;
using NHibernate;
using BVMB.DataLayer.BusinessObjects;
using BVMB.DataLayer.Base;

namespace BVMB.DataLayer.ManagerObjects
{
    public partial interface IBaoCaoThangManager : IManagerBase<BVMB.DataLayer.BusinessObjects.BaoCaoThang, int>
    {
		// Get Methods
		IList<BaoCaoThang> GetByMaBaoCaoNam(System.Int32 baoCaoDoanhThuNam);
    }

    partial class BaoCaoThangManager : ManagerBase<BVMB.DataLayer.BusinessObjects.BaoCaoThang, int>, IBaoCaoThangManager
    {
		#region Constructors
		
		public BaoCaoThangManager() : base()
        {
        }
        public BaoCaoThangManager(INHibernateSession session) : base(session)
        {
        }
		
		#endregion
		
        #region Get Methods

		
		public IList<BaoCaoThang> GetByMaBaoCaoNam(System.Int32 baoCaoDoanhThuNam)
        {
            ICriteria criteria = Session.GetISession().CreateCriteria(typeof(BaoCaoThang));
			
			
			ICriteria baoCaoDoanhThuNamCriteria = criteria.CreateCriteria("BaoCaoDoanhThuNam");
            baoCaoDoanhThuNamCriteria.Add(NHibernate.Criterion.Expression.Eq("Id", baoCaoDoanhThuNam));
			
			return criteria.List<BaoCaoThang>();
        }
		
		#endregion
    }
}